// 用户信息store
import { defineStore } from 'pinia'
import { ref } from 'vue'


export const useDictionaryStore = defineStore('dictionary', () => {
    const dictionary = ref(JSON.parse(localStorage.getItem('dictionary') as string) || [])
    function setDictionary(data: []): void {
        dictionary.value = data
        localStorage.setItem('dictionary', JSON.stringify(data))
    }

    return { dictionary, setDictionary }
})